#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<string>
#include<vector>
#include<list>
using namespace std;
int main()
{
	string s2("wangyehui");
	//cout << s2.size() << endl;
	//cout << s2.length() << endl;
	//for (int i = 0; i < s2.size(); i++)
	//{
	//	cout << s2[i] << " ";
	//}
	//cout << endl;

	////string::iterator it = s2.begin();
	////while (it != s2.end())
	////{
	////	cout << *it << " ";
	////	it++;
	////}
	////cout << endl;
	//for (auto e : s2)
	//{
	//	cout << e << " ";
	//}
	//cout << endl;

	//vector<int> ls;
	//ls.push_back(1);
	//ls.push_back(2);
	//ls.push_back(3);
	//ls.push_back(4);
	//ls.push_back(5);
	//ls.push_back(6);
	//vector<int>::iterator it = ls.begin();
	//while (it != ls.end())
	//{
	//	cout << *it << " ";
	//	it++;
	//}
	//cout << endl;

	//list<double> l;
	//l.push_back(1.21);
	//l.push_back(2.21);
	//l.push_back(3.21);
	//l.push_back(4.21);
	//l.push_back(5.21);
	//l.push_back(6.21);
	//l.push_back(7.21);
	//list<double>::iterator l1 = l.begin();
	//while(l1 != l.end())
	//{
	//	cout << *l1 << " ";
	//	l1++;
	//}
	//cout << endl;
	//string s1("kang gao jin");
	//int begin = 0;
	//int end = s1.size() - 1;

	////while (begin != end)
	////{
	////	swap(s1[begin], s2[end]);
	////	begin++;
	////	end--;
	////}
	////reverse(s1.begin(),s1.end());
	//string::reverse_iterator it = s1.rbegin();
	//while (it != s1.rend())
	//{
	//	cout << *it << " ";
	//	it++;
	//}
	//string s4("yang jun hui");
	//cout << s4.capacity() << endl;
	//s4.reserve(40);
	//cout << s4.capacity() << endl;


	//string s5("yang jun hui");
	//cout << s5.capacity() << endl;
	//s5.resize(40);
	//cout << s5.capacity() << endl;

	//string s6("yang jun hui");
	//cout << s6.capacity() << endl;
	//s6.resize(40,'x');
	//cout << s6 << endl;
	//cout << s6.capacity() << endl;
	string s1("text.cpp");
	string s4("texr.txt");
	size_t pos1 = s1.find('.');
	if (pos1 != string::npos)
	{
		string s3 = s1.substr(pos1);
		cout << s3 << endl;
	}
	return 0;
}